<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>WeakMap弱引用特性</title>
</head>
<body>
    <script>
        let hd = {
            name : "dfsdf"
        };
        cms = hd;
        let weakmap = new WeakMap();
        weakmap.set(hd,"jfkdljgf");
        hd = null;
        cms = null;
        console.log(weakmap);
        setTimeout(function () {
            console.log(weakmap);
        },1000);
    </script>
</body>
</html>